import { SET_TEL , SENDTEL_TIME} from '@/constants/login'

const INITIAL_STATE = {
  tel: '',
  telTime:0 //0未发送过手机号，1已发送，2可以再次发送
}

export default function counter (state = INITIAL_STATE, action) {
  switch (action.type) {
    case SET_TEL:
      return {
        ...state,
        tel: action.data
      }
    case SENDTEL_TIME:
      return {
        ...state,
        telTime: action.data
      }
    default:
      return state
  }
}
